package com.douxg.learning.tool.hutool;

import cn.hutool.core.io.IoUtil;
import cn.hutool.crypto.SmUtil;

import java.io.*;
import java.util.Base64;

/**
 * douxg
 */
public class SmTest {
    public static void main(String[] args) throws FileNotFoundException {
        String a = "wejijfksjdfksjdfajsioewjinjkl12399nskfuijknskfoinwiodnwdnkw";
        String s = SmUtil.sm3(a);
        System.out.println(s);
        Base64.Decoder decoder = Base64.getDecoder();
        InputStream wrap = decoder.wrap(new FileInputStream(new File("D:\\工作资料\\项目资料\\国信\\护网\\Sangfor_SIP.xml")));
        FileOutputStream fileOutputStream = new FileOutputStream(new File("D:\\工作资料\\项目资料\\国信\\护网\\Sangfor_SIP2.xml"));
        IoUtil.copy(wrap, fileOutputStream);
    }
}
